
public class RaceCon
{
	public static void main(String[] args) throws Exception
	{
		new RaceCon();
	}
	
	int i = 0;
	
	public RaceCon() throws Exception
	{
		Runnable calcI = new Runnable()
		{
			@Override
			public void run()
			{
				incementI();
			}
		};
		
		Thread t1 = new Thread(calcI);
		Thread t2 = new Thread(calcI);
		
		t1.start();
		t2.start();
		
		t1.join();
		t2.join();
		
		System.out.println(i);
	}
	
	private synchronized void incementI()
	{
		i++;
	}
}
